package com.yupi.springbootinit.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 场馆信息表
 * @TableName court
 */
@TableName(value ="court")
@Data
public class Court implements Serializable {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 场地名称
     */
    private String courtName;

    /**
     * 场地地址 省
     */
    private String courtProvince;

    /**
     * 场地名称 市
     */
    private String courtcity;

    /**
     * 场地名称 详细地址
     */
    private String courtaddres;

    /**
     * 场馆联系电话
     */
    private String phoneNumber;

    /**
     * 场馆面积
     */
    private Integer courtArea;

    /**
     * 场馆主要功能
     */
    private String courtMain;

    /**
     * 营业状态（只能填写提前设置好的内容，如营业、休息、关门等等）
     */
    private String businessStatus;

    /**
     * 扩展字段
     */
    private String ext1;

    /**
     * 扩展字段
     */
    private String ext2;

    /**
     * 扩展字段
     */
    private String ext3;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 是否删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Court other = (Court) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCourtName() == null ? other.getCourtName() == null : this.getCourtName().equals(other.getCourtName()))
            && (this.getCourtProvince() == null ? other.getCourtProvince() == null : this.getCourtProvince().equals(other.getCourtProvince()))
            && (this.getCourtcity() == null ? other.getCourtcity() == null : this.getCourtcity().equals(other.getCourtcity()))
            && (this.getCourtaddres() == null ? other.getCourtaddres() == null : this.getCourtaddres().equals(other.getCourtaddres()))
            && (this.getPhoneNumber() == null ? other.getPhoneNumber() == null : this.getPhoneNumber().equals(other.getPhoneNumber()))
            && (this.getCourtArea() == null ? other.getCourtArea() == null : this.getCourtArea().equals(other.getCourtArea()))
            && (this.getCourtMain() == null ? other.getCourtMain() == null : this.getCourtMain().equals(other.getCourtMain()))
            && (this.getBusinessStatus() == null ? other.getBusinessStatus() == null : this.getBusinessStatus().equals(other.getBusinessStatus()))
            && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
            && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
            && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCourtName() == null) ? 0 : getCourtName().hashCode());
        result = prime * result + ((getCourtProvince() == null) ? 0 : getCourtProvince().hashCode());
        result = prime * result + ((getCourtcity() == null) ? 0 : getCourtcity().hashCode());
        result = prime * result + ((getCourtaddres() == null) ? 0 : getCourtaddres().hashCode());
        result = prime * result + ((getPhoneNumber() == null) ? 0 : getPhoneNumber().hashCode());
        result = prime * result + ((getCourtArea() == null) ? 0 : getCourtArea().hashCode());
        result = prime * result + ((getCourtMain() == null) ? 0 : getCourtMain().hashCode());
        result = prime * result + ((getBusinessStatus() == null) ? 0 : getBusinessStatus().hashCode());
        result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
        result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
        result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", courtName=").append(courtName);
        sb.append(", courtProvince=").append(courtProvince);
        sb.append(", courtcity=").append(courtcity);
        sb.append(", courtaddres=").append(courtaddres);
        sb.append(", phoneNumber=").append(phoneNumber);
        sb.append(", courtArea=").append(courtArea);
        sb.append(", courtMain=").append(courtMain);
        sb.append(", businessStatus=").append(businessStatus);
        sb.append(", ext1=").append(ext1);
        sb.append(", ext2=").append(ext2);
        sb.append(", ext3=").append(ext3);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}